home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tcoop10a.zip / DOC.ZIP / WINDOW.DOC < prev   
Text File  |  1991-11-20  |  5KB  |  128 lines

  1. WINDOW.DOC      11/20/91        Copyright (c) 1991 by James S. Clark
  2. ==========================================================================
  3. WINDOW
  4. Window Class
  5. --------------------------------------------------------------------------
  6. Class Name                      Window
  7. Superclass                      Node
  8. Category                        Desktop
  9. Other classes referenced        <none>
  10. Other catagories referenced     <none>
  11. Used by                         many
  12. Inherited by                    Menu
  13.  
  14. Declaration                     Window  *window = new Window("Title", 10, 10,
  15.                                                 20, 15, flags, colors);
  16. Instance Variables
  17.                                 int     id;
  18.                                 int     flag;
  19.                                 char    *backdata;
  20.                                 int     x1, y1;
  21.                                 int     x2, y2;
  22.                                 colors  *color;
  23.                                 char    *title;
  24. Instance Methods
  25.                                 Window  (char *title, int x1, int y1,
  26.                                                 int x2, int y2, int flags,
  27.                                                 colors *clr);
  28.                                 ~Window ()      { };
  29.                                 void    close   ();
  30.                                 void    emboss  ();
  31.                                 void    frame   (int hilight);
  32.                                 void    settitle(char *theTitle, int hilight);
  33.                                 void    shadow  ();
  34.                                 int     startup ();
  35. --------------------------------------------------------------------------
  36. GENERAL DESCRIPTION
  37.  
  38. The Window Class provides a simple set of methods for creating colored
  39. text windows on the screen.  Methods are provided for drawing and erasing
  40. windows, as well as special routines creating drop-shadows and embossing
  41. the frame.  The Window flag controls the appearance of the frame and other
  42. features specific to each window.
  43.  
  44. --------------------------------------------------------------------------
  45. VARIABLES       (all private)
  46.  
  47. int     id;
  48.         The Window's ID number.
  49.  
  50. int     flag;
  51.         The current window attribute flag.
  52.  
  53. char    *backdata;
  54.         Pointer to the window background text buffer.
  55.  
  56. int     x1, y1;
  57.         The upper left corner of the window.
  58.  
  59. int     x2, y2;
  60.         The lower right corner of the window.
  61.  
  62. colors  *color;
  63.         Color set used to draw the window.
  64.  
  65. char    *title;
  66.         Pointer to the window's title, if any.
  67.  
  68. --------------------------------------------------------------------------
  69. METHODS
  70.  
  71. Window  (char *title, int x1, int y1, int x2, int y2, int flags, colors *clr);
  72.         Creates a new window of the stated size, attributes, and colors.
  73.         The window will be drawn immediately.
  74.  
  75. ~Window ()      { };
  76.         Destroys the window.  Same as the close method.
  77.  
  78. void    close   ();
  79.         Erases the window from the screen, and deletes its backdata.
  80.  
  81. void    emboss  ();
  82. void    frame   (int hilight);
  83.         Draws a frame around the window.
  84.  
  85. void    settitle(char *theTitle, int hilight);
  86.         Changes the window title and displays it.
  87.  
  88. void    shadow  ();
  89.         Draws a drop-shadow under the lower right edge of the window.
  90.  
  91. int     startup ();
  92.         Initializes the Desktop system.  Should be called first, before
  93.         issuing any other commands.
  94.  
  95. int     textbox(int x1, int y1, int x2, int y2, int mode, char *str);
  96.         This method will print text in the window using the parameters
  97.         given as the boundry.  The mode can be set to left, center,
  98.         or right justification.
  99.  
  100. --------------------------------------------------------------------------
  101. WINDOW FLAG ATTRIBUTES
  102.  
  103. The flags may be passed at the time of the window's creation.
  104.  
  105. W_BLANK         the window is blank, without a frame, title, etc.
  106. W_TITLE         the window has a title
  107. W_FRAME         the window has a frame
  108. W_DOUBLE        the frame is a double border
  109. W_SHADOW        the window has a drop-shadow on the lower right
  110. W_EMBOSS        the window frame is embossed
  111. W_CLOSE         the window has a close button (unused)
  112. W_ZOOM          the window has a zoom button (unused)
  113. W_SIZE          the window has a size button (unused)
  114. W_SHOWING       the window is currently showing (unused)
  115.  
  116. --------------------------------------------------------------------------
  117. TEXTBOX MODE ATTRIBUTES
  118.  
  119. The flags are passed as the mode in the textbox() method.
  120.  
  121. T_LEFT          left justisfied text (default)
  122. T_CENTER        center justified text
  123. T_RIGHT         right justified text
  124.  
  125. --------------------------------------------------------------------------
  126. WINDOW.DOC                      Copyright (c) 1991 by James S. Clark
  127. ==========================================================================
  128.